a5ws_ChangeLoggedInUserPassword Function

Syntax

P Result = a5ws_ChangeLoggedInUserPassword(C OriginalPassword ,C NewPassword ,C ConfirmPassword [,* request [,* session ]])

Arguments

Result

Holds status. Result.errors will return TRUE if any errors are found during processing. result.error_text holds any messages returned

OriginalPassword

The current password for the current logged in user

NewPassword

New password to enter

ConfirmPassword

Double entry of new password

request

(optional) The Request system variable. This variable explicitly passes the request object to the function.

session

(optional) The Session System variable. This variable explicitly passes the session object to the function.

Description

Web Security - Change a logged in user's password. This can only be run from the Application Server

Discussion

Web Security - Change a logged in user's password. The a5ws_ChangeLoggedInUserPassword() function populates a dot variable with two possible return values. Result.errors will return False if security is not active, a password is not required for the current security configuration, or a password change was successful. All other conditions return Result.errors = true. Messages will almost always be returned in Result.error_text. The following conditions give the message shown

Security is not active. "Security is Not Active"
A password is not required. "Security Does Not Require a Password"
The password change was successful. "Password Changed"
The function was not run from a page or component on the App server. "This option can only be run from the Application Server"
No user is logged in when the function is called. "No User is Logged In"
The security does not allow password change. "Password Change is Not Allowed"
The data did not validate. "Invalid Data Supplied"
The password data is valid, but not accepted by rule. "Password Information Not Accepted"

Example

dim pResult as p
pResult = a5ws_ChangeLoggedInUserPassword(OriginalPassword,NewPassword ,ConfirmPassword ,request, session)

Limitations

Can only be run from the Application Server

See Also